#ifndef __M_MSG_H__
#define __M_MSG_H__
#include <string>
#include <thread>
#include "level.hpp"
#include "util.hpp"

// [时间]][日志器名][线程id][文件:行号][日志等级]：日志内容
struct LogMsg
{
    time_t _time;
    std::string _logger;
    std::thread::id _tid;
    std::string _file;
    size_t _line;
    LogLevel::value _level;
    std::string _payload;

    LogMsg(){}
    LogMsg(LogLevel::value level,  size_t line,  std::string file,
           std::string name, std::string payload)
           : _time(Date::now()), _logger(name), _tid(std::this_thread::get_id()),
             _file(file), _line(line), _level(level), _payload(payload)
    {}
};
#endif  